#include<iostream>
#include<algorithm>
#include<stack>
#include<string>
using namespace std;
const int N = 1e6 + 10;
int stk[N], top;
int st[N];
string s;
int main()
{
	cin >> s;
	int n = s.size();
	s = " " + s;
	for (int i = 1; i <= n; i++) {
		if (s[i] == '(')stk[++top] = i;
		else {
			if (top) {
				st[stk[top--]] = 1;
				st[i] = 1;
			}
		}
	}
	int ma = 0;
	int ans = 0;
	for (int i = 1; i <= n + 1; i++) {
		if (st[i])ans++;
		else ma = max(ans, ma), ans = 0;
	}
	ans = 0;
	int cnt = 0;
	for (int i = 1; i <= n + 1; i++) {
		if (st[i])ans++;
		else {
			if (ans == ma)cnt++;
			ans = 0;
		}
	}
	if (!ma) cout << "0 1" << endl;
	else cout << ma << " " << cnt << endl;
	return 0;
}
